var readline = require('readline-sync')
readline.setDefaultOptions({ prompt: '' })
var readline = readline.prompt
let str = readline()
let map = {}
for (let char of str) {
  if (!map[char]) {
    map[char] = 1
  } else {
    map[char]++
  }
}
let res = ''
for (let key in map) {
  if (map[key] >= 2) {
    res += key
  }
}
console.log(res);